% by YLX 6/11
% Version 4.0
% For generate PIE of m = 1:N
% imporves performace of the programe
function genPIE(N)
    global J seq index PIEs PIE
    PIEs = cell(1, N+1);
    for m = 0:N 
        PIE = zeros(nchoosek(m+J-1, J-1), J);
        index = 1;
        seq = zeros(1, J-1);
        expandFor(m, J-1);
        PIEs(m+1) = {PIE};
    end
    return;